import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './assets/css/public.css'
import axios from 'axios'
import moment from 'moment' // 赋值使用
import './plugins/element.js'
import './assets/fonts/iconfont.css' // 导入文件


Vue.prototype.$moment = moment
// axios.defaults.baseURL = '/hrm'
axios.interceptors.request.use((config) => {
  // 为请求头对象，添加token验证的Authorization字段
  config.headers.Authorization =window.sessionStorage.getItem('token')
  return config
})


Vue.prototype.$http = axios
Vue.prototype.$moment = moment // 赋值使用
Vue.config.productionTip = false

new Vue({
  router,
  render: (h) => h(App)
}).$mount('#app')
